import request from '@/utils/request'

// 获取验证码
export function getCodeImg () {
  return request({
    url: '/api/v1/getCaptcha',
    method: 'get'
  })
}

// 查询 此接口不在验证数据权限
export function getSetting () {
  return request({
    url: '/api/v1/app-config',
    method: 'get'
  })
}
// 修改
export function updateSetting (data) {
  return request({
    url: '/api/v1/setting',
    method: 'post',
    data: data
  })
}

// 修改密码
export function updatePassword (data, codeObj) {
  return request({
    url: `/v2/user/generate_pwd_certificate?vcode=${codeObj.code}&vid=${codeObj.vid}`,
    method: 'post',
    data: data
  })
}
